package com.tianshuo.main;

import com.tianshuo.config.AppConfig;
import com.tianshuo.config.PropertiesConf;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @ClassName : PropertiesSourceApplicationContext
 * @Description : 测试propertiesSuorce功能
 * @Author : tianshuo
 * @Date: 2020-08-27 11:02
 */
public class PropertiesSourceApplicationContext {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        PropertiesConf propertiesConf = applicationContext.getBean(PropertiesConf.class);

        System.out.println(propertiesConf.getName());

    }
}

